package cn.cjxy.day11springbootdemo2.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * - Java中的接口：是一个类
 * - Controller层的接口：是一个请求方法/控制器类方法
 * @author huangjie
 * @date 2025/10/10
 */
@Controller
public class HelloController {
    @RequestMapping("/hello")
    @ResponseBody
    public String hello(HttpServletRequest request, HttpServletResponse response) {
        return "Hello World!";
    }
}
